﻿using System;
public enum AccessTypeEnum
{
    ReadOnly = 0, ReadWrite = 1, Denny = 2
}

public class AccessTypeManager
{
    public static AccessTypeEnum Cast(int lpValue)
    {
        return (AccessTypeEnum)Enum.Parse(typeof(AccessTypeEnum), lpValue.ToString());
    }

    public static int Cast(AccessTypeEnum lpEnumValue)
    {
        return (int)lpEnumValue;
    }

}